<template>
    <view>
        <!-- #ifdef MP-WEIXIN -->
             <top-nav :inner-title="storeInfo.shop_name" is-show-back="true" is-fixed="false" :navH="navH" :n="n" is-white="bg-white" opacity="1"></top-nav>
        <!-- #endif -->
        <top-nav :inner-title="storeInfo.shop_name" is-show-back="true" is-fixed="false" :navH="navH" :n="n" is-white="bg-white" opacity="1"></top-nav>
        <view class="header">
          <view class="content-wrapper">
            <view class="avatar">
              <image :src="storeInfo.icon"></image>
            </view>
            <view class="content">
              <!-- <view class="title">{{storeInfo.shop_name}}</view> -->
              <view class="description">
                <text>起送￥{{storeInfo.start_send_price}}</text>
                <text>配送￥{{storeInfo.send_price}}</text>
              </view>
              <view class="bulletin-wrapper">
                <text>月售{{storeInfo.month_order}}</text>
              </view>
            </view>
          </view>
        </view>
        <view class="notice">
          <view class="notice-list">
            <view class="left"><text>公告:</text></view>
            <view class="right"><text>{{storeInfo.notice}}</text></view>
            <view style="width:60rpx;"></view>
          </view>
          <view class="notice-border"></view>
          <view class="notice-list">
            <view class="left"><text>活动:</text></view>
            <view class="right">
              <block v-for='(item,index) in activeList' :for-item='val' :key="index">
                  <text>{{val.text}}</text>
              </block>
            </view>
            <view style="width:60rpx;"></view>
          </view>
        </view>

        <view class='fujia'>
            <view class='option'>
                <view class='item'>
                    <view>
                        <text class="a1">商家信息</text>
                    </view>
                    <text></text>
                </view>
            </view>
            <view class='option'>
                <view class='item'>
                    <view>
                        <text>营业时间</text>
                    </view>
                    <text>{{storeInfo.disable_time}}</text>
                </view>
            </view>
            <view class='option'>
                <view class='item' @click="goMobile()">
                    <view>
                        <text>联系电话</text>
                    </view>
                    <text style="flex: 1;color: #4B76FF;">{{storeInfo.mobile}}</text>
                    <icon class="arr_right"></icon>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
    import uniFly from 'unifly';
	import request from '../../../common/request.js';
	import $api_base from '../../../api/api_base.js';
	import topNav from '@/template/topnav/index.vue';
	export default {
		components: { topNav },
		data() {
			return {
				navH: 0,
				n: 0,
                storeInfo:[],
                activeList:[],
                title:'同学快跑'
			}
		},
		onLoad: function (options) {
            this.navH   = getApp().globalData.navHeight;
            this.n      = getApp().globalData.n;
            var storeId = options.storeId || 0;
            var self = this;
            $api_base.post($api_base.storeInfo,{store_id: storeId}).then(function(res) {
                let data = res.data;
                if (data.ok == 1) {
                    self.storeId    = storeId;
                    self.storeInfo  = data.store_info;
                    self.activeList = data.active_list;
                }
            });
		},
		methods:{
			goMobile: function () {
                uni.makePhoneCall({
                    phoneNumber: this.data.storeInfo.mobile || ''
                });
            },
		}
	}
</script>

<style lang="scss" scoped>
	@import 'index.scss';
</style>

